Optimal. Leaf size=360 \[ \frac{i p \text{PolyLog}\left (2,1-\frac{2 \sqrt{f} \sqrt{g} (d x+e)}{\left (\sqrt{f}-i \sqrt{g} x\right ) \left (e \sqrt{g}+i d \sqrt{f}\right )}\right )}{2 \sqrt{f} \sqrt{g}}+\frac{i p \text{PolyLog}\left (2,-\frac{i \sqrt{g} x}{\sqrt{f}}\right )}{2 \sqrt{f} \sqrt{g}}-\frac{i p \text{PolyLog}\left (2,\frac{i \sqrt{g} x}{\sqrt{f}}\right )}{2 \sqrt{f} \sqrt{g}}-\frac{i p \text{PolyLog}\left (2,1-\frac{2 \sqrt{f}}{\sqrt{f}-i \sqrt{g} x}\right )}{2 \sqrt{f} \sqrt{g}}+\frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (c \left (d+\frac{e}{x}\right )^p\right )}{\sqrt{f} \sqrt{g}}-\frac{p \tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (\frac{2 \sqrt{f} \sqrt{g} (d x+e)}{\left (\sqrt{f}-i \sqrt{g} x\right ) \left (e \sqrt{g}+i d \sqrt{f}\right )}\right )}{\sqrt{f} \sqrt{g}}+\frac{p \log \left (\frac{2 \sqrt{f}}{\sqrt{f}-i \sqrt{g} x}\right ) \tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right )}{\sqrt{f} \sqrt{g}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.436601, antiderivative size = 360, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 12, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.546, Rules used = {205, 2470, 12, 260, 6688, 4876, 4848, 2391, 4856, 2402, 2315, 2447} \[ \frac{i p \text{PolyLog}\left (2,1-\frac{2 \sqrt{f} \sqrt{g} (d x+e)}{\left (\sqrt{f}-i \sqrt{g} x\right ) \left (e \sqrt{g}+i d \sqrt{f}\right )}\right )}{2 \sqrt{f} \sqrt{g}}+\frac{i p \text{PolyLog}\left (2,-\frac{i \sqrt{g} x}{\sqrt{f}}\right )}{2 \sqrt{f} \sqrt{g}}-\frac{i p \text{PolyLog}\left (2,\frac{i \sqrt{g} x}{\sqrt{f}}\right )}{2 \sqrt{f} \sqrt{g}}-\frac{i p \text{PolyLog}\left (2,1-\frac{2 \sqrt{f}}{\sqrt{f}-i \sqrt{g} x}\right )}{2 \sqrt{f} \sqrt{g}}+\frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (c \left (d+\frac{e}{x}\right )^p\right )}{\sqrt{f} \sqrt{g}}-\frac{p \tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (\frac{2 \sqrt{f} \sqrt{g} (d x+e)}{\left (\sqrt{f}-i \sqrt{g} x\right ) \left (e \sqrt{g}+i d \sqrt{f}\right )}\right )}{\sqrt{f} \sqrt{g}}+\frac{p \log \left (\frac{2 \sqrt{f}}{\sqrt{f}-i \sqrt{g} x}\right ) \tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right )}{\sqrt{f} \sqrt{g}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 2470
Rule 12
Rule 260
Rule 6688
Rule 4876
Rule 4848
Rule 2391
Rule 4856
Rule 2402
Rule 2315
Rule 2447
Rubi steps
\begin{align*} \int \frac{\log \left (c \left (d+\frac{e}{x}\right )^p\right )}{f+g x^2} \, dx &=\frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (c \left (d+\frac{e}{x}\right )^p\right )}{\sqrt{f} \sqrt{g}}+(e p) \int \frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right )}{\sqrt{f} \sqrt{g} \left (d+\frac{e}{x}\right ) x^2} \, dx\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (c \left (d+\frac{e}{x}\right )^p\right )}{\sqrt{f} \sqrt{g}}+\frac{(e p) \int \frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right )}{\left (d+\frac{e}{x}\right ) x^2} \, dx}{\sqrt{f} \sqrt{g}}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (c \left (d+\frac{e}{x}\right )^p\right )}{\sqrt{f} \sqrt{g}}+\frac{(e p) \int \frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right )}{x (e+d x)} \, dx}{\sqrt{f} \sqrt{g}}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (c \left (d+\frac{e}{x}\right )^p\right )}{\sqrt{f} \sqrt{g}}+\frac{(e p) \int \left (\frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right )}{e x}-\frac{d \tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right )}{e (e+d x)}\right ) \, dx}{\sqrt{f} \sqrt{g}}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (c \left (d+\frac{e}{x}\right )^p\right )}{\sqrt{f} \sqrt{g}}+\frac{p \int \frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right )}{x} \, dx}{\sqrt{f} \sqrt{g}}-\frac{(d p) \int \frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right )}{e+d x} \, dx}{\sqrt{f} \sqrt{g}}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (c \left (d+\frac{e}{x}\right )^p\right )}{\sqrt{f} \sqrt{g}}+\frac{p \tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (\frac{2 \sqrt{f}}{\sqrt{f}-i \sqrt{g} x}\right )}{\sqrt{f} \sqrt{g}}-\frac{p \tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (\frac{2 \sqrt{f} \sqrt{g} (e+d x)}{\left (i d \sqrt{f}+e \sqrt{g}\right ) \left (\sqrt{f}-i \sqrt{g} x\right )}\right )}{\sqrt{f} \sqrt{g}}-\frac{p \int \frac{\log \left (\frac{2}{1-\frac{i \sqrt{g} x}{\sqrt{f}}}\right )}{1+\frac{g x^2}{f}} \, dx}{f}+\frac{p \int \frac{\log \left (\frac{2 \sqrt{g} (e+d x)}{\sqrt{f} \left (i d+\frac{e \sqrt{g}}{\sqrt{f}}\right ) \left (1-\frac{i \sqrt{g} x}{\sqrt{f}}\right )}\right )}{1+\frac{g x^2}{f}} \, dx}{f}+\frac{(i p) \int \frac{\log \left (1-\frac{i \sqrt{g} x}{\sqrt{f}}\right )}{x} \, dx}{2 \sqrt{f} \sqrt{g}}-\frac{(i p) \int \frac{\log \left (1+\frac{i \sqrt{g} x}{\sqrt{f}}\right )}{x} \, dx}{2 \sqrt{f} \sqrt{g}}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (c \left (d+\frac{e}{x}\right )^p\right )}{\sqrt{f} \sqrt{g}}+\frac{p \tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (\frac{2 \sqrt{f}}{\sqrt{f}-i \sqrt{g} x}\right )}{\sqrt{f} \sqrt{g}}-\frac{p \tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (\frac{2 \sqrt{f} \sqrt{g} (e+d x)}{\left (i d \sqrt{f}+e \sqrt{g}\right ) \left (\sqrt{f}-i \sqrt{g} x\right )}\right )}{\sqrt{f} \sqrt{g}}+\frac{i p \text{Li}_2\left (-\frac{i \sqrt{g} x}{\sqrt{f}}\right )}{2 \sqrt{f} \sqrt{g}}-\frac{i p \text{Li}_2\left (\frac{i \sqrt{g} x}{\sqrt{f}}\right )}{2 \sqrt{f} \sqrt{g}}+\frac{i p \text{Li}_2\left (1-\frac{2 \sqrt{f} \sqrt{g} (e+d x)}{\left (i d \sqrt{f}+e \sqrt{g}\right ) \left (\sqrt{f}-i \sqrt{g} x\right )}\right )}{2 \sqrt{f} \sqrt{g}}-\frac{(i p) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1-\frac{i \sqrt{g} x}{\sqrt{f}}}\right )}{\sqrt{f} \sqrt{g}}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (c \left (d+\frac{e}{x}\right )^p\right )}{\sqrt{f} \sqrt{g}}+\frac{p \tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (\frac{2 \sqrt{f}}{\sqrt{f}-i \sqrt{g} x}\right )}{\sqrt{f} \sqrt{g}}-\frac{p \tan ^{-1}\left (\frac{\sqrt{g} x}{\sqrt{f}}\right ) \log \left (\frac{2 \sqrt{f} \sqrt{g} (e+d x)}{\left (i d \sqrt{f}+e \sqrt{g}\right ) \left (\sqrt{f}-i \sqrt{g} x\right )}\right )}{\sqrt{f} \sqrt{g}}+\frac{i p \text{Li}_2\left (-\frac{i \sqrt{g} x}{\sqrt{f}}\right )}{2 \sqrt{f} \sqrt{g}}-\frac{i p \text{Li}_2\left (\frac{i \sqrt{g} x}{\sqrt{f}}\right )}{2 \sqrt{f} \sqrt{g}}-\frac{i p \text{Li}_2\left (1-\frac{2 \sqrt{f}}{\sqrt{f}-i \sqrt{g} x}\right )}{2 \sqrt{f} \sqrt{g}}+\frac{i p \text{Li}_2\left (1-\frac{2 \sqrt{f} \sqrt{g} (e+d x)}{\left (i d \sqrt{f}+e \sqrt{g}\right ) \left (\sqrt{f}-i \sqrt{g} x\right )}\right )}{2 \sqrt{f} \sqrt{g}}\\ \end{align*}
Mathematica [A] time = 0.224825, size = 373, normalized size = 1.04 \[ \frac{-p \text{PolyLog}\left (2,\frac{d \left (\sqrt{-f}-\sqrt{g} x\right )}{d \sqrt{-f}+e \sqrt{g}}\right )+p \text{PolyLog}\left (2,\frac{d \left (\sqrt{-f}+\sqrt{g} x\right )}{d \sqrt{-f}-e \sqrt{g}}\right )-p \text{PolyLog}\left (2,\frac{\sqrt{g} x}{\sqrt{-f}}+1\right )+p \text{PolyLog}\left (2,\frac{f \sqrt{g} x}{(-f)^{3/2}}+1\right )+\log \left (\sqrt{-f}-\sqrt{g} x\right ) \log \left (c \left (d+\frac{e}{x}\right )^p\right )-\log \left (\sqrt{-f}+\sqrt{g} x\right ) \log \left (c \left (d+\frac{e}{x}\right )^p\right )-p \log \left (\sqrt{-f}-\sqrt{g} x\right ) \log \left (\frac{\sqrt{g} (d x+e)}{d \sqrt{-f}+e \sqrt{g}}\right )+p \log \left (\sqrt{-f}+\sqrt{g} x\right ) \log \left (-\frac{\sqrt{g} (d x+e)}{d \sqrt{-f}-e \sqrt{g}}\right )+p \log \left (\frac{\sqrt{g} x}{\sqrt{-f}}\right ) \log \left (\sqrt{-f}-\sqrt{g} x\right )-p \log \left (\frac{f \sqrt{g} x}{(-f)^{3/2}}\right ) \log \left (\sqrt{-f}+\sqrt{g} x\right )}{2 \sqrt{-f} \sqrt{g}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.752, size = 0, normalized size = 0. \begin{align*} \int{\frac{1}{g{x}^{2}+f}\ln \left ( c \left ( d+{\frac{e}{x}} \right ) ^{p} \right ) }\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\log \left (c \left (\frac{d x + e}{x}\right )^{p}\right )}{g x^{2} + f}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\log \left (c{\left (d + \frac{e}{x}\right )}^{p}\right )}{g x^{2} + f}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]